<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>用户修改页面</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
<body>
<div>
		<h4 style="font-size:20px; color:#0000FF">系统管理&gt;&gt;用户管理&gt;&gt;用户修改</h4>
</div>
	<div align="center">
		 <h3>用户修改</h3>
		 <form action="updateUser.action" method="post">
		 <input name="user.id" type="hidden" value="<s:property value="user.id"/>">
			<table border="1px" width="600px">
				<tr>
					<td>用户登录ID:</td>
					<td><input name="user.loginName" type="text" value="<s:property value="user.loginName"/>" readonly="readonly"></td>
				</tr>
				<tr>
					<td>用户登录密码:</td>
					<td><input name="user.password" type="password" value="<s:property value="user.password"/>"></td>
				</tr>
				<tr>
					<td>确认密码:</td>
					<td><input type="password" value="<s:property value="user.password"/>" onblur="checkPwd()"></td>
				</tr>
				<tr>
					<td>用户中文名称:</td>
					<td><input name="user.username" type="text" value="<s:property value="user.username"/>"></td>
				</tr>
				<tr>
					<td>用户所属部门:</td>
					<td>
						<select name="deptId">
							<s:iterator value="deptList">
								<s:if test="user.dept.id == id">
									<option selected="selected" value="<s:property value="id" />"><s:property value="name" /></option>
								</s:if>
								<s:else>
									<option value="<s:property value="id" />"><s:property value="name" /></option>
								</s:else>
							</s:iterator>
						</select>
					</td>
				</tr>
				<tr>
					<td>用户所在岗位:</td>
					<td>
						<select name="jobId">
							<s:iterator value="jobList">
								<s:if test="user.job.id == id">
									<option selected="selected" value="<s:property value="id" />"><s:property value="name" /></option>
								</s:if>
								<s:else>
									<option value="<s:property value="id" />"><s:property value="name" /></option>
								</s:else>
							</s:iterator>
						</select>
					</td>
				</tr>
				<tr>
					<td>用户状态：</td>
					<td>
						<s:if test="user.status.trim() == '启用'">
							<input name="user.status" checked="checked" type="radio" value="启用">启用
						</s:if>
						&nbsp;
						<s:else>
							<input name="user.status" type="radio" value="启用">启用
						</s:else>
						<s:if test="user.status.trim() == '禁用'">
							<input name="user.status" checked="checked" type="radio" value="禁用">禁用
						</s:if>
						&nbsp;
						<s:else>
							<input name="user.status" type="radio" value="禁用">禁用
						</s:else>
					</td>
				</tr>
				<tr>
					<td colspan="2" align="center"><input type="submit" value="修改">&nbsp;<input type="button" value="返回" onclick="location.href='findAllUsers.action'"></td>
				</tr>
			</table>
			</form>
	</div>
</body>
</html>
